
public class Bicycle implements Cloneable{
	private int gear;
	private int cadence;
	private int speed;
	MountainBike bb=null;

  	public Bicycle(int gear,int cadence,int speed){
		this.gear=gear;
		this.cadence=cadence;
		this.speed=speed;
	  }

	public void Setup(int i,int j,int k){
		this.gear=i;
		this.cadence=j;
		this.speed=k;
	}
	public void SetupMountainBike(MountainBike b){
		this.bb=b;
	}
	public MountainBike GetMountainBike(){
		return this.bb;
	}

	public void printDescription(){

 		System.out.println("gear:" + this.gear + " cadence:" + this.cadence + " speed:" + this.speed+" rotate:"+this.bb.Getvaule()+"\n");
		
	}


   	public Object clone() throws CloneNotSupportedException {
		Bicycle ccc=(Bicycle)super.clone();

		if(bb!=null){
			MountainBike newbb=(MountainBike)bb.clone();
			ccc.SetupMountainBike(newbb);
		}
       		return ccc;
    	}

}
